package com.aaa.controller;

import com.aaa.entity.EmpInfo;
import com.aaa.service.EmpInfoService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;

import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;



@RestController
@RequestMapping("system/empInfo")
public class EmpInfoController {

    @Autowired
    private EmpInfoService empInfoService;

    @GetMapping("/getByName/{name}")
    public EmpInfo getByName(@PathVariable String name){
        QueryWrapper<EmpInfo> wrapper=new QueryWrapper<>();
        wrapper.eq("ename",name);
        EmpInfo admin = empInfoService.getOne(wrapper);
        return admin;
    }


}
